<template>
    <div>
        <!-- <h3>预览部门</h3> -->
        <el-table
        :data="tableData"
        style="width: 100%">
        <el-table-column
            prop="id"
            label="编号"
            width="180">
        </el-table-column>
        <el-table-column
            prop="name"
            label="姓名"
            width="180">
        </el-table-column>
        <el-table-column
            prop="created_time"
            label="创建时间">
        </el-table-column>
        <el-table-column 
            prop="updated_time"
            label="结束时间">
        </el-table-column>
        </el-table>        
    </div>
</template>

<script>
import {get} from "../../utils/request"
export default {
    data(){
        return{
            tableData:[], // 接受全部部门信息

        }
    },
    methods:{
        getDep(){
            get("/v1/workers/department/")
            .then((res) => {
                console.log("预览部门信息",res)
                this.tableData = res.data
            }).catch((err) => {
                console.log(err)
            });
        }
    },
    mounted(){
        this.getDep();
    }
    
}
</script>

<style>

</style>